<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>用户注册登录界面</title>
		<link rel="stylesheet" type="text/css" href="rstyle.css"/>
		
		<script type="text/javascript">
		<!-- 输入信息判断 -->
		function test_reg(){
			var un_reg=document.getElementById("un_reg").value;
			var pw_reg=document.getElementById("pw_reg").value;
			var pwt_reg=document.getElementById("pwt_reg").value;
			var c=0;
			
			if(pw_reg!=pwt_reg){
				alert("密码输入不相同，请重新确认密码！");
				c=1;
			}
			
			if((un_reg==" ")||(pw_reg==" ")||(pwt_reg==" ")){
				alert("请将信息填写完整！");
				c=1;
			}
			
			if((pw_reg.length<6)||(pw_reg.length>8)){
				alert("用户名和密码必须在6到8位之间！");
				c=1;
			}
			
			if(c==1)
			return false;
		}
		</script>
	</head>
	
	<body>
		<div id="l">1</div>
		
		<nav>
			<span>Have an account? sign in</span>
			<a href="#r"><img src="larrow.png"/></a>
		</nav>
	<!--注册 -->
		<section>
			<form action="sign_up.php" method="post">
				<input type="text" id="un_reg" class="input" name="userName" value="" placeholder="USER NAME"/>
			
				<input type="password" id="pw_reg" class="input" name="userPwd" value="" placeholder="PASSWORD"/>
				
				<input type="password" id="pwt_reg" class="input" name="userPwd" value="" placeholder="PASSWORD AGAIN"/>
				
				<p>
					Student<input type="radio" name="userType" value="1"checked/>
					&nbsp;&nbsp;
				   teacher<input type="radio" name="userType" value="0"/>
				</p>
				<p>&nbsp;</p>
				<p>&nbsp;</p>
				<input type="submit" value="Sign up" onclick="return test_reg()" class="substyle"/>
				<input type="reset" value="Reset" class="resstyle"/>
			</form>
			<aside>
				<span>WELCOME</span> to</br>our system
			</aside>
		</section>
	
		<div id="rside">
			<div id="r">1</div>
			
			<nav>
				<a href="#l"><img src="arrow.png"/></a>
				<span>New here? sign up</span>
			</nav>
<!--登陆 -->
			<section>			
				<form action="sign_in.php" method="post">
					<p>&nbsp;</p>
					<p>&nbsp;</p>
					<input type="text" id="un" class="input" name="userName" value="" placeholder="USER ID"/>
					<p>&nbsp;</p>
					<input type="password" id="pw" class="input" name="userPwd" value="" placeholder="PASSWORD"/>	
					<p>&nbsp;</p>
					<p>
						Student<input type="radio" name="userType" value="1"checked/>
						&nbsp;&nbsp;
					   teacher<input type="radio" name="userType" value="0"/>
					</p>		
					<input type="submit" value="Sign in" class="substyle"/>
					<input type="reset" value="Reset" class="resstyle"/>
				</form>
				
				<aside>
					<span>WELCOME</span> to</br>our system
				</aside>				
			</section>
		</div>	
	</body>
</html>